package com.wjerp.tplus.server.common.exception;


import com.wjerp.tplus.server.common.constant.ErrorDetail;

/**
 * 链接发生异常
 * @author lishuailei
 */
public class ConnectionException extends Exception {

    private String errorCode;

    private String errorMsg;

    public ConnectionException(String errCode, String errMsg) {
        super();

        this.errorCode = errCode;
        this.errorMsg = errMsg;
    }

    public ConnectionException(ErrorDetail e){
        super();

        this.errorCode = e.getErrorCode();
        this.errorMsg = e.getErrorMsg();
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
